Data may be stored in different kinds of memories such as Static Random Access Memory (SRAM), Random Access Memory (RAM), and Dynamic random-access memory (DRAM). The stored data may be at risk from potential attack. For example, in a System-on-a-chip (SOC) unit, or other embedded systems, the memory external to SOC may be attacked by potential hackers. At the same time, more and more data is stored in DRAM external to SOC controllers, especially for markets such as Point-of-Sale (POS), automatic teller machine (ATM), banking and self-automated payment systems. As smartphones and mobile payments systems gains traction, the data stored in mobile devices also becomes hacking targets.